package com.guigu.vo;

import lombok.Data;

import java.io.Serializable;

@Data
public class Result<T> implements Serializable {

    private static final long serialVersionUID = -7946590064868721990L;

    /**
     * 200
     * 400
     * 500
     * ...
     */
    private String code;

    /**
     * true | false
     */
    private String flag;

    private String message;

    private T data;

    public Result() {
    }

    public Result(String code, String flag, String message, T data) {
        this.code = code;
        this.flag = flag;
        this.message = message;
        this.data = data;
    }
}
